/**
 * A container for tests.
 */
function Tests()
{
    this.doInit.apply(this, arguments);
    this.tests = new Array();
}

/**
 *
 *
 */
Tests.prototype = domplate(TestFireObject,
{


    init: function()
    {
        this.displayValue = "Tests";
    },


    getTests: function()
    {
        return this.tests;
    },

/**
 * Only display an expansion-available indicator if there is at least one test in this container
 */
    getHasChildren: function()
    {
        return this.tests.length != 0
    },

    getChildrenToDisplay: function()
    {
        var ary = new Array();
        for ( var i = 0; i < this.tests.length; ++i )
        {
            ary.push({name: this.tests[i].displayValue, object: this.tests[i] });
        }
        return ary;
    },

    getContextMenuItems: function( object, target )
    {
        try
        {
            var items = [];
            items.push(
                "-",
            { nol10n: 1, label: "Add new Test", command: FBL.bindFixed(this.createTest, this) });
        }
        catch( ex )
        {
            Firebug.TestFire.util.tf_debug(ex);
        }

        return items;
    },

    

    

    toXMLStringAry: function()
    {
        var ret = new Array();
        for(var i = 0; i < this.tests.length; i++){
            ret = ret.concat(this.tests[i].toXMLStringAry());
        }

        return ret;
    }





});